import java.util.Scanner;

public class Score_1 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        double score=0;
        double sum=0;
        double avgscore=0;
        double basic=0;
        double max=0;
        double min=0;
        for (int i=1;i<=3;i++){
            System.out.println("请输入"+i+"班5名同学成绩");
            for (int j=1;j<=5;j++){
                System.out.println("请输入第"+j+"位同学成绩");
                score=input.nextDouble();
                sum+=score;
                if (score>0&&score<100){
                    if (basic==0){
                        basic=score;
                        min=score;
                        continue;
                    }else if (score>basic){
                        max=score;
                        basic=score;
                    }else{
                        min=score;
                        basic=score;
                    }
                }else{
                    System.out.println("输入错误请重新输入");
                }

            }
            avgscore=Math.round(sum/5*100)*0.01d;
            System.out.println(i+"班"+"平均成绩为"+avgscore);
            System.out.println(i+"班"+"总成绩为"+sum);
            System.out.println(i+"班"+"最高成绩为"+max);
            System.out.println(i+"班"+"最低成绩为"+min);
        }
    }
}
